<%@ page import="com.mlt.back.beans.BasicInfo" %>
<%@ page import="com.mlt.back.service.impl.BasicInfoServiceImpl" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
    // 获取传值
    String basicInfoId = request.getParameter("basic_info_id");

    // 比对获取对应的数据
    List<BasicInfo> basicInfos = new BasicInfoServiceImpl().list();
    BasicInfo basicInfo = null;
    for (BasicInfo temp : basicInfos) {
        if (basicInfoId.equals(String.valueOf(temp.getBasic_info_id()))){
            basicInfo = temp;
            break;
        }
    }
%>

<html>
<head>
    <meta charset="utf-8">
    <title>修改规格类型</title>
</head>
<body>

<div>
    <h2>修改规格类名</h2>
    <div>
        <form action="/mlt_war_exploded/basicInfo/modify" method="post">
            <div>
                <label>管理名称:</label>
                <input type="text" name="basic_info_id" value="<%=basicInfo.getBasic_info_id()%>" hidden>
                <input type="text" name="basic_info_name" value="<%=basicInfo.getBasic_info_name()%>" placeholder="请输入管理名称">
                <select name="basic_info_status">
                    <option value="">请选择状态</option>
                    <option value="0" <%=basicInfo.getBasic_info_status() == 0 ? "selected" : ""%>>禁用</option>
                    <option value="1" <%=basicInfo.getBasic_info_status() == 1 ? "selected" : ""%>>启用</option>
                </select>
                <input type="submit">
            </div>
        </form>
    </div>
</div>

</body>
</html>
